﻿using MES.Process.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MES.Process.Infrastructure
{
    public interface IBaseRepository<T> where T : BaseData
    {
        MESDBContext _context { get; }
        Task<int> AddAsync(T entity);
        Task<int> AddRangeAsync(List<T> entity);
        Task<int> UpdateAsync(T entity);
        Task<int> UpdateRangeAsync(List<T> entity);
        Task<int> DeleteAsync(T entity);
        Task<int> DeleteRangeAsync(List<T> entity);
        /// <summary>
        /// 查询
        /// </summary>
        /// <returns></returns>
        IQueryable<T> GetValues();
    }
}
